package com.ruoyi.rsikManage.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.rsikManage.domain.MonitorPointHistory;
import com.ruoyi.rsikManage.service.MonitorPointHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.List;

@RequestMapping("/monitorPointHistory")
@RestController
public class MonitorPointHistoryController extends BaseController {
    @Autowired
    MonitorPointHistoryService monitorPointHistoryService;
    /**
     * 查询某个监控点一段时间的历史数据
     */
    @GetMapping("/select")
    public AjaxResult selectMonitorPointHistory(String apeId, Date startTime, Date endTime, String isOnline) {
        List<MonitorPointHistory> monitorPointHistory = monitorPointHistoryService.selectMonitorPointHistory(apeId, startTime, endTime, isOnline);
        return AjaxResult.success(monitorPointHistory);
    }
}
